app.service("brandService",function($http){
    this.findAll = function(){
        return $http.get("../brand/findAll.do");
    };
    this.findByPage = function(currentPage,itemsPerPage){
        return $http.get("../brand/findByPage.do?pageNum="
            +currentPage+"&pageSize="+itemsPerPage);
    };
    this.save = function(entity){
        return $http.post("../brand/addBrand.do",entity);
    };
    this.updateBrand = function(entity){
        return $http.post("../brand/updateBrand.do",entity);

    };
    this.findById = function(number){
        return $http.get("../brand/findById.do?id="+number)
    }
    this.delete= function(selectIds){
        return $http.get("../brand/delete.do?id="+selectIds)
    }
    this.search = function(currentPage,itemsPerPage,searchEntity){
        return $http.post("../brand/search.do?pageNum="
            +currentPage+"&pageSize="+itemsPerPage,searchEntity)
    }

    this.selectOptionList = function(){
        return $http.get("../brand/selectOptionList.do")
    }

})